Pin third-party GitHub Actions to commit SHAs - #615
Merged
Conversation
Third-party actions were referenced by movable major tags (e.g. actions/checkout@v6). A tag can be repointed by the upstream owner or an attacker who compromises that action's repo, silently running new code in our CI - the class of supply-chain attack seen with tj-actions in 2025. Pin the externally-owned actions to the immutable commit SHA the tag resolves to, with the version kept in a trailing comment. Dependabot (github-actions ecosystem) updates both the SHA and the comment together, so they do not drift. Pinned: actions/checkout, actions/setup-node, actions/github-script, actions/stale, github/codeql-action (init/autobuild/analyze). Deliberately NOT pinned: azure/login and azure/powershell stay on @V3. These are our own actions used as test/provisioning tooling - the canary and integration suites exist to validate the current v3, so pinning them to a SHA would freeze what the tests exercise and cause them to drift from the released major. The supply-chain threat model (us attacking our own action's CI) does not apply. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
requested a deployment
to
Automation test
August 18, 2026 01:47 — with
GitHub Actions
Waiting
MaddyMicrosoft
marked this pull request as ready for review
August 18, 2026 01:48
Yeming Liu (isra-fel)
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pins externally-owned GitHub Actions to immutable commit SHAs to reduce supply-chain risk.
Changes
Third-party actions were referenced by movable major tags (e.g.
actions/checkout@v6). A tag can be repointed by the upstream owner, or by an attacker who compromises that action's repository, silently running new code in our CI with our permissions. This is the class of attack seen withtj-actionsin 2025.Each externally-owned action is now pinned to the commit SHA its tag currently resolves to, with the human-readable version kept in a trailing comment:
actions/checkout→ v6.1.0actions/setup-node→ v6.5.0actions/github-script→ v7.1.0actions/stale→ v8.0.0github/codeql-action(init/autobuild/analyze) → v3.37.7Maintenance
Dependabot is already configured for the
github-actionsecosystem. It understands SHA pins and raises update PRs that bump both the SHA and the trailing version comment together, so the pins stay current without manual tracking and do not drift from the comment.Deliberately not pinned
azure/loginandazure/powershellstay on@v3. These are our own actions used as test and provisioning tooling; the canary and integration suites exist to validate the currentv3, so pinning them to a SHA would freeze what the tests exercise and cause drift from the released major. The supply-chain threat model does not apply to our own action's CI.